package com.lookme.lmtool.cracker.filter.blur;

import com.jhlabs.image.GaussianFilter;
import com.jhlabs.image.GlowFilter;
import com.lookme.lmtool.cracker.CrackerConstants;
import com.lookme.lmtool.cracker.annotation.FilterAnnotation;
import com.lookme.lmtool.cracker.annotation.ParamAnnotation;
import com.lookme.lmtool.cracker.filter.AbstractFilter;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

import java.awt.image.BufferedImageOp;

@FilterAnnotation(groupName = CrackerConstants.FILTER_GROUP_NAME_BLUR,name="高斯模糊",filterClass = GaussianFilter.class)
public class FilterGaussian extends AbstractFilter {
    @XStreamAsAttribute
    @ParamAnnotation(name = "半径", desc = "半径",inputType = ParamAnnotation.InputType.Slider,width = 300,amountToStepBy = 0.1,majorTickUnit = 30,minorTickCount = 5)
    float radius=2;
    @Override
    public BufferedImageOp getFilter() {
        GaussianFilter filter= new GaussianFilter();
        filter.setRadius(radius);
//        filter.setExposure(exposure);
        return filter;
    }
}
